Closed
Conversation
Fixes #20939 Add a PR check for proposed API changes without VS Code engine update. * Modify `package.json` to add a new script entry `check-proposed-api`. * Modify `.github/workflows/pr-file-check.yml` to add a new step to run the `check-proposed-api` script. * Add `src/check-proposed-api.js` to check for changes in `enabledApiProposals` and `vscode` engine version, and fail if `enabledApiProposals` is modified but `vscode` engine version is not updated. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/microsoft/vscode-python/issues/20939?shareId=XXXX-XXXX-XXXX-XXXX).
Member
Author
|
@anthonykim1 what do you think of this? Do you think this is the right approach? |
anthonykim1
reviewed
Dec 11, 2024
|
|
||
| if (JSON.stringify(enabledApiProposals) !== JSON.stringify(originalEnabledApiProposals) && | ||
| vscodeEngineVersion === originalVscodeEngineVersion) { | ||
| console.error('Error: `enabledApiProposals` was modified but `vscode` engine version was not updated.'); |
There was a problem hiding this comment.
Should we throw error to be more explicit? I just dont want this to get hidden in pile of other logs&error.
|
I think this is great idea, but how are we defining original package.json from "new package.json"? (is it comparing to the what is in the package.json before changes in a given PR) I also see but wondering where does .original contents get updated. |
Member
Author
|
closing as this problem doesn't face us enough to use workers on it |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #20939
Add a PR check for proposed API changes without VS Code engine update.
package.jsonto add a new script entrycheck-proposed-api..github/workflows/pr-file-check.ymlto add a new step to run thecheck-proposed-apiscript.src/check-proposed-api.jsto check for changes inenabledApiProposalsandvscodeengine version, and fail ifenabledApiProposalsis modified butvscodeengine version is not updated.For more details, open the Copilot Workspace session.